function collect_same_elements(collection_a, object_b) {
  var a=[];
  var arr=[];
  for(var ai=0;ai<collection_a.length;ai++){
    a.push(collection_a[ai].key);
  }
  console.log(a);
  let b=object_b.value;
  console.log(b);
  for(var i=0;i<a.length;i++){
    for(var j=0;j<b.length;j++){
      if(a[i]==b[j]){
        arr.push(a[i]);
      }
    }
  }
return arr;
console.log(arr); //在这里写入代码
}

module.exports = collect_same_elements;
